//
//  AddSendBtnCell.m
//  MIDI
//
//  Created by 邵子凡 on 15/11/5.
//  Copyright © 2015年 QXSX. All rights reserved.
//

#import "AddSendBtnCell.h"

@interface AddSendBtnCell ()

@property (weak, nonatomic) IBOutlet UIButton *sendBtn;
@end

@implementation AddSendBtnCell

+(instancetype)cellWithTableView:(UITableView *)tableView{
    
    static NSString *ID = @"AddSendBtnCell";
    
    AddSendBtnCell  *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    
    if (cell == nil) {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"AddSendBtnCell" owner:nil options:nil]firstObject] ;
    }
    
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    
    return cell;
}

- (void)awakeFromNib {
    
    self.sendBtn.layer.cornerRadius = 8;
    [self.sendBtn addTarget:self action:@selector(sendBtn_Click:) forControlEvents:UIControlEventTouchUpInside];
}

- (void)sendBtn_Click:(UIButton *)sender{
    
    if ([self.delegate respondsToSelector:@selector(uploadAddSendBtn:)]) {
        
        [self.delegate uploadAddSendBtn:sender];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
